/* 页面整体 */
body {
    margin: auto;
    max-width: 580px;
    font-size: 14px;
    font-family: Helvetica, Arial, sans-serif;
    background-color: #f8f9fa;
}

/* 页脚 */
footer {
    color: #888;
    margin-top: 15px;
    text-align: center;
    padding: 10px;
    border-top: 1px solid #e5e5e5;
}

/* 头像 */
.avatar {
    width: 40px;
}

/* 电影列表 */
.movie-list {
    list-style-type: none;
    padding: 0;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
}

.movie-list li {
    padding: 12px 24px;
    border-bottom: 1px solid #ddd;
}

.movie-list li:last-child {
    border-bottom:none;
}

.movie-list li:hover {
    background-color: #f8f9fa;
}

/* 龙猫图片 */
.totoro {
    display: block;
    margin: 0 auto;
    height: 100px;
}
.float-right {
    float: right;
}

.imdb {
    font-size: 12px;
    font-weight: bold;
    color: black;
    text-decoration: none;
    background: #F5C518;
    border-radius: 5px;
    padding: 3px 5px;
}
nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #333;
}

nav li {
    float: left;
}

nav li a {
    display: block;
    color: white;
    text-align: center;
    padding: 8px 12px;
    text-decoration: none;
}

nav li a:hover {
    background-color: #111;
}
/* 覆盖某些浏览器对 input 元素定义的字体 */
input[type=submit] {
    font-family: inherit;
}

input[type=text] {
    border: 1px solid #ddd;
}

input[name=year] {
    width: 50px;
}

.btn {
    font-size: 12px;
    padding: 3px 5px;
    text-decoration: none;
    cursor: pointer;
    background-color: white;
    color: black;
    border: 1px solid #555555;
    border-radius: 5px;
}

.btn:hover {
    text-decoration: none;
    background-color: black;
    color: white;
    border: 1px solid black;
}
.alert {
    position: relative;
    padding: 7px;
    margin: 7px 0;
    border: 1px solid transparent;
    color: #004085;
    background-color: #cce5ff;
    border-color: #b8daff;
    border-radius: 5px;
}
.inline-form {
    display: inline;
}

.navbar {
    margin-bottom: 2rem;
}

.blog-post {
    margin-bottom: 4rem;
}

.blog-post-title {
    margin-bottom: .25rem;
    font-size: 2.5rem;
}

.blog-post-meta {
    margin-bottom: 1.25rem;
    color: #727272;
}

.card {
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-columns {
    @include media-breakpoint-only(lg) {
        column-count: 3;
    }
    @include media-breakpoint-only(xl) {
        column-count: 3;
    }
}

.text-truncate {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-group .btn {
    margin-right: 4px;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

.modal-body {
    padding: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.movie-recommendations {
    padding: 20px;
}

.section-title {
    font-size: 1.5rem;
    margin: 20px 0;
    color: #333;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.movie-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.movie-card:hover {
    transform: translateY(-5px);
}

.movie-poster {
    position: relative;
    padding-top: 150%;
}

.movie-poster img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-info {
    padding: 12px;
}

.movie-info h3 {
    font-size: 1rem;
    margin: 0 0 8px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.year {
    color: #666;
    font-size: 0.9rem;
    margin: 4px 0;
}

.rating {
    color: #f5c518;
    font-size: 0.9rem;
}

.watch-btn {
    display: block;
    text-align: center;
    background: #007bff;
    color: white;
    padding: 6px;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 8px;
}

.watch-btn:hover {
    background: #0056b3;
}

/* 评论样式 */
.comment-item {
    border-left: 3px solid #dee2e6;
    padding-left: 15px;
    margin-bottom: 20px;
}

.comment-header {
    margin-bottom: 5px;
}

.comment-author {
    font-weight: bold;
    margin-right: 10px;
}

.comment-content {
    margin-bottom: 5px;
}

.comment-actions {
    font-size: 0.9em;
}

.comment-actions a {
    margin-right: 10px;
    color: #6c757d;
}

.replies {
    margin-left: 20px;
    padding-left: 15px;
    border-left: 2px solid #e9ecef;
}

/* AI聊天样式 */
.ai-chat-box {
    margin-bottom: 30px;
}

.chat-messages {
    max-height: 400px;
    overflow-y: auto;
}

.message {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 4px;
}

.user-message {
    background-color: #f8f9fa;
    margin-left: 20%;
}

.ai-message {
    background-color: #e9ecef;
    margin-right: 20%;
}

.ai-assistant-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #007bff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: transform 0.2s;
}

.ai-assistant-btn:hover {
    transform: scale(1.1);
}

.ai-assistant-btn i {
    font-size: 24px;
}

.ai-chat-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    z-index: 1000;
}

.ai-chat-header {
    padding: 15px;
    background: #007bff;
    color: white;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-chat-header .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0 5px;
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
}

.user-message, .ai-message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 80%;
    word-wrap: break-word;
}

.user-message {
    background: #007bff;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.ai-message {
    background: white;
    border: 1px solid #dee2e6;
    margin-right: auto;
    border-bottom-left-radius: 5px;
}

.thinking {
    opacity: 0.7;
}

.ai-chat-input {
    padding: 15px;
    background: white;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 10px;
}

.ai-chat-input input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    outline: none;
}

.ai-chat-input input:focus {
    border-color: #007bff;
}

.ai-chat-input button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.ai-chat-input button:hover {
    background: #0056b3;
}